package net.wapproject.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "game")
public class Game extends BaseObject{

	/**
	 * 
	 */
	private static final long serialVersionUID = 3575145677405795589L;

	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer id;
	
	@Column(name = "img")
	private String avatar;
	
	@Column(name = "name")
	private String name;
	
	@Column(name = "create_date")
	private Date createDate;
	
	@Column(name = "description")
	private String description;
	
	@Column(name = "details")
	private String details;
	
	@Column(name = "path_download")
	private String pathDownload;
	
	@Column(name = "total_download")
	private Integer totalDownload;
	
	@Column(name = "total_view")
	private Integer totalView;
	
	@Column(name = "root_category")
	private Integer rootCategory;
	
	@ManyToOne(cascade = CascadeType.ALL)
	private Category category;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public String getPathDownload() {
		return pathDownload;
	}

	public void setPathDownload(String pathDownload) {
		this.pathDownload = pathDownload;
	}

	public Integer getTotalDownload() {
		return totalDownload;
	}

	public void setTotalDownload(Integer totalDownload) {
		this.totalDownload = totalDownload;
	}

	public Integer getTotalView() {
		return totalView;
	}

	public void setTotalView(Integer totalView) {
		this.totalView = totalView;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	/**
	 * @return the rootCategory
	 */
	public Integer getRootCategory() {
		return rootCategory;
	}

	/**
	 * @param rootCategory the rootCategory to set
	 */
	public void setRootCategory(Integer rootCategory) {
		this.rootCategory = rootCategory;
	}
}
